package com.lanou.horo.zhuizhui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lanou.horo.zhuizhui.utility.factory.FragmentFactory;

/**
 * Created by dllo on 15/10/24.
 */
public class CommunityPageTitleAdapter extends FragmentPagerAdapter {

    private String[] title = { "精华","同人","吐槽","安利","资源","COS","勾搭"};

    public CommunityPageTitleAdapter(FragmentManager fm) {
        super(fm);
    }


    @Override
    public Fragment getItem(int position) {
        return FragmentFactory.createFragment(position);

    }

    @Override
    public int getCount() {
        return title.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return title[position];

    }
}